package com.tanhua.dubbo.api;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.tanhua.dubbo.mapper.AnnouncementMapper;
import com.tanhua.model.domain.Announcement;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;


import java.util.List;

@DubboService
public class AnnouncementImpl implements AnnouncementApi {
    @Autowired
    private AnnouncementMapper announcementMapper;

    @Override
    public Page findAnnouncements(Integer page, Integer pagesize) {
        Page pageinfor = new Page(page,pagesize);
        Page pages = announcementMapper.selectPage(pageinfor, null);
        return pages;
    }
}
